<admintpl file="header" />
</head>
<body>
    <div class="wrap js-check-wrap">
        <ul class="nav nav-tabs">
            <li class="active"><a href="{:U('Playbill/index')}">节目单管理</a></li>
            <li><a href="{:U('Playbill/add')}">添加节目单</a></li>
            <li><a href="{:U('Playbill/customize')}">自选下发</a></li>
        </ul>
        <form class="well form-search js-ajax-form" method="post" action="{:U('Playbill/index')}">
            节目单状态：
            <select name="pstatus" style="width: 80px;">
                <foreach name="status" item="vo">
                    <option <if condition="(I('param.pstatus') eq $vo['id'])" >selected</if> value="{$vo.id}">{$vo.name}</option>
                </foreach>
            </select>
            节目单位置：
            <select name="template" style="width: 150px;">
                <option value="0">请选择</option>
                <foreach name="template" item="vo">
                    <option <if condition="(I('param.template') eq $vo['id'])" >selected</if> value="{$vo.id}">{$vo.name}</option>
                </foreach>
            </select>
            节目单名称：
            <input type="text" name="keyword" style="width: 140px;" value="{:I('param.keyword')}" placeholder="请输入查询内容...">
           有效期：
            <input type="text" name="start_time" class="js-datetime" value="{:I('param.start_time')}" style="width: 120px;" autocomplete="off"> ~
            <input type="text" name="end_time" class="js-datetime"  value="{:I('param.end_time')}" style="width: 120px;" autocomplete="off">
            <input type="submit" class="btn btn-primary" value="搜索" />
            <if condition="$count" >共查询到 {$count} 条数据</if>
        </form>
            <div class="pagination">{$page}</div>
			<table class="table table-hover table-bordered">
                <thead>
                    <tr>
                        <th width="60">id</th>
                        <th>名称</th>
						<th>简介</th>
                        <th>位置</th>
                        <th width="250">有效期</th>
                        <th>操作人</th>
                        <th width="110">操作</th>
                    </tr>
                </thead>
                <foreach name="game" item="vo">
                    <tr>
                        <td>{$vo.id}</td>
                        <td>{$vo.name}<if condition="$vo['ptype'] eq 2"> - <b>底层节目单</b></if></td>
                        <td>{$vo.introduction}</td>
						<td>{$vo.template_name}</td>
						<td>{$vo.start_at} ~ {$vo.end_at}</td>
						<td><foreach name="users" item="user"><if condition="$vo['userid'] eq $user['id']">{$user.user_login}</if></foreach></td>
                        <td>
							<if condition="$vo['pstatus'] eq 1">
								<a href="{:U('Playbill/up',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="您确定要启用节目单吗？">未启用 </a>
							</if>
							<if condition="$vo['pstatus'] eq 2">
								<a href="{:U('Playbill/down',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="您确定要停用节目单吗？" style="color: #FF0000;"><b>已启用</b></a>
							</if>
							<if condition="$vo['pstatus'] egt 3">
								<a href="{:U('Playbill/up',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="您确定要启用节目单吗？">已停用 </a>
							</if>
							<if condition="$vo['pstatus'] eq 2">
							| <a href="{:U('Playbill/pull',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="您确定要下发节目单吗？"><b>下发</b></a>
							</if>
							<if condition="$vo['pstatus'] eq 4">
							| 已下发
							</if>
							| <a href="{:U('Playbill/edit', array('id'=>$vo['id']))}">{:L('EDIT')}</a>
                        </td>
                    </tr>
                </foreach>
                <thead>
                    <tr>
                        <th width="60">id</th>
                        <th>名称</th>
						<th>简介</th>
                        <th>位置</th>
                        <th width="250">有效期</th>
                        <th>操作人</th>
                        <th width="110">操作</th>
                    </tr>
                </thead>
            </table>
            <div class="pagination">{$page}</div>
    </div>
    <script src="__PUBLIC__/js/common.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/content_addtop.js"></script>
</body>
</html>
